feat: allow canister_info to be invoked via query calls - #346
Open
mraszyk wants to merge 2 commits into
Open
Conversation
Interface spec 0.67.0. The management canister method `canister_info` can now be invoked via non-replicated (query) calls by external users and from composite query methods, in addition to inter-canister calls. It remains rejected for ingress messages. Retrieving canister information is not subject to any access control. Integrated with the composite query support added in 0.66.0: `canister_info` is handled as a case of `management_canister_query` rather than as a separate code path in `composite_query_helper`.
|
🤖 Here's your preview: https://k7oic-piaaa-aaaam-ai7uq-cai.icp0.io |
mraszyk
commented
Aug 18, 2026
mraszyk
marked this pull request as ready for review
August 31, 2026 19:57
pierugo-dfinity
approved these changes
Sep 1, 2026
| if A.num_requested_changes = null then From = |S.canister_history[A.canister_id].recent_changes| | ||
| else From = max(0, |S.canister_history[A.canister_id].recent_changes| - A.num_requested_changes) | ||
| End = |S.canister_history[A.canister_id].recent_changes| - 1 | ||
|
|
There was a problem hiding this comment.
Do we also need A.canister_id ∈ dom(S.canisters)?
| The IC management canister address is `aaaaa-aa` (i.e. the empty blob). | ||
|
|
||
| It is possible to use the management canister via external requests (a.k.a. ingress messages). The cost of processing that request is charged to the canister that is being managed. Most methods only permit the controllers to call them. Calls to `raw_rand` and `deposit_cycles` are never accepted as ingress messages. | ||
| It is possible to use the management canister via external requests (a.k.a. ingress messages). The cost of processing that request is charged to the canister that is being managed. Most methods only permit the controllers to call them. Calls to `raw_rand`, `deposit_cycles`, and `canister_info` are never accepted as ingress messages (but `canister_info` can be invoked via query calls, see [IC method `canister_info`](#ic-canister_info)). |
There was a problem hiding this comment.
Maybe worth mentioning canister_metadata can't be called with an ingress either (could also be done in a separate PR) (source)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The management canister method
canister_infocan now be invoked via non-replicated (query) calls by external users and from composite query methods, in addition to inter-canister calls. It remains rejected for ingress messages. Retrieving canister information is not subject to any access control.